Post-merge-review: Fix template-no-arguments-for-html-elements: add svg and mathml elements#2687
Merged
NullVoxPopuli merged 2 commits intoember-cli:masterfrom Apr 15, 2026
Conversation
2ff4253 to
3118f91
Compare
| // - has NO uppercase letters (component invocations like <MyThing>) | ||
| // - does NOT contain '-' (HTML custom elements like <my-element>) | ||
| // Everything else is a component / custom-element / slot — not a plain HTML element. | ||
| function isHtmlElement(tagName) { |
Contributor
There was a problem hiding this comment.
use html-tags, don't use this function.
this function is duplicated through mayn rules, and we should just remove it
Contributor
Author
There was a problem hiding this comment.
Switched to html-tags + svg-tags + scope (same approach as #2689). Dropped the isHtmlElement helper
NullVoxPopuli
requested changes
Apr 14, 2026
…vg-tags Adds svg-tags to the html-tags allowlist so `<circle @r="x">` etc. are flagged alongside HTML elements. Documents accepted false negatives (custom elements, namespaced components, named blocks) via new test cases. Also adds a test for the scope-check path (`div` rebound in GJS is treated as a component, not flagged).
5dea854 to
fbc68ce
Compare
Extends the allowlist with MathML tag names. NullVoxPopuli confirmed the plugin can use ESM-only packages since the supported Node range (>=20.19) has require(esm). Adds invalid tests for `<mfrac @numerator="x">` and `<circle @r="5" />` (SVG, via svg-tags).
NullVoxPopuli
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
svg-tagsto the element allowlist alongside existinghtml-tags— so<circle @r="x">etc. are now flagged.<my-element @foo="x">), namespaced components (<NS.Foo @bar="baz">), and named blocks (<:slot @item="x">) aren't in the allowlists, so they're not flagged. Web-component namespace is open and can't be enumerated.divis rebound in GJS (let div = <template>...),<div @greeting="hello">is treated as a component invocation and not flagged.Test plan
<div @title="x">/<button @onClick=...>/<span @data=...>→ flagged<circle @r="x">(SVG) → now flagged<MyComponent @title="x">→ valid<NS.Foo @bar="baz">→ valid (dotted, not in allowlist)<my-element @foo="x">→ valid (accepted false negative)<:slot @item="x">→ valid (colon-prefixed, not in allowlist)<div @greeting="x">wheredivis rebound in GJS → valid (scope check)